package com.nervenets.web.entity;

import com.alibaba.fastjson.JSONObject;

import java.io.Serializable;

/**
 * Created by Joe on 2018/3/7.
 */
public class GetAesParams implements Serializable {
    private RedirectType t = RedirectType.def;
    private int uid;
    private int tid;

    public GetAesParams() {
    }

    public GetAesParams(String json) {
        JSONObject object = JSONObject.parseObject(json);
        setT(RedirectType.valueOf(object.getString("t")));
        setUid(object.getIntValue("uid"));
        setTid(object.getIntValue("tid"));
    }

    public GetAesParams(RedirectType t, int uid, int tid) {
        this.t = t;
        this.uid = uid;
        this.tid = tid;
    }

    public RedirectType getT() {
        return t;
    }

    public void setT(RedirectType t) {
        this.t = t;
    }

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public int getTid() {
        return tid;
    }

    public void setTid(int tid) {
        this.tid = tid;
    }
}
